File Management
File Management
Your application can easily locate the files it needs by using alias records. An
alias record is a data structure that identifies a file, folder, or volume.
Whenever your application needs to store the location of a file or directory that
it might need later, you can record the location and other identifying
information in an alias record. The next time your application needs the file
or directory, you can use the alias record to locate it, even if the user has
renamed it, copied it, re stored it from backup, or moved it. You can also use
alias records to identify objects on other volumes, including AppleShare
volumes. The Alias Manager provides routines for managing the information
in alias records.
Note that the Finder creates alias objects that are visible to the user, while
your application usually creates alias records when it needs to store
identifying information about a file or directory that it uses internally.
You can also quickly search a disk for particular files using File Manager
routines. You can search for one or more files that match certain criteria that
your application specifies. For example, your application can search for all
files that have a modification date later than June 15, 1991, and the
File Manager returns to your application a list of all files that match this
specification.
In System 7.0, individuals can share files with other users. A user can make
all files within one or more of the folders on a local disk available over a
network. This increases the chance that documents created by your application
are used in a shared environment.
The File Manager provides a new standard format for identifying files. You
can use this standard format in File Manager routines, and other managers
also accept files specified in the new format.
The user interface for opening and saving a file is enhanced in System 7.0.
The Standard File Package provides two new procedures,
StandardGetFile and StandardPutFile, that your application can use to
display the standard user interface for choosing a file. To customize the user
interface for choosing a file, you can use the new CustomGetFile and
CustomPutFile procedures.
See the File Manager for information on identifying and locating files on a
volume, see the Standard File Package for information on letting the user
choose a file, and see the Alias Manager for information on using
alias records.